Skip to content

chore(deps): bump pydantic-ai-slim from 2.74.0 to 2.75.0 in /pydantic-ai - #121

Merged
github-actions[bot] merged 1 commit into
mainfrom
dependabot/pip/pydantic-ai/pydantic-ai-slim-2.75.0
Dec 3, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
dependabot/pip/pydantic-ai/pydantic-ai-slim-2.75.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Dec 3, 2026

Copy link
Copy Markdown
Contributor

Bumps pydantic-ai-slim from 2.74.0 to 2.75.0.

Release notes

Sourced from pydantic-ai-slim's releases.

v2.75.0 (2026-11-25)

What's Changed

⚠️ Compatibility Notes

  • Keep workspace files below 'operator' authority out of the instructions in RepoContext, Skills and Memory, and add lowest_authority_under by @​adtyavrdhn in pydantic/pydantic-ai#11837
    • Text from a workspace file below 'operator' authority no longer reaches the instructions: RepoContext names the working directory's file for the model to read with its file tools and sends an ancestor's file as framed data, Skills offers such skills through list_skills and load_skill tools instead of load_capability, and Memory attributes such a snapshot to its MEMORY.md. Files at 'operator', the default, are unchanged. Durable runs now record extra realpath workspace calls at run start, so let in-flight runs finish, or use Temporal worker versioning or a new DBOS app version, before upgrading. RepoContext(autoload_instructions=False) with nested instruction files misses the prompt cache once on the first request after upgrading.
  • Raise empty and unreadable model responses as ModelEmptyResponseError and ModelInvalidResponseError, so FallbackModel and ModelFallback fall back on them by @​DouweM in pydantic/pydantic-ai#12108
    • With their default fallback_on, FallbackModel and ModelFallback now fall back on an empty stream, an OpenAI Chat completion without choices, and an OpenAI Chat body that isn't JSON or doesn't match the schema, where the run used to raise UnexpectedModelBehavior. Both new errors subclass ModelAPIError and UnexpectedModelBehavior, so except UnexpectedModelBehavior still catches them, but an except ModelAPIError placed before it now takes them; an empty Mistral or OpenAI choices raises one instead of AssertionError or IndexError. To keep raising instead of falling back, pass a fallback_on that leaves them out, such as lambda e: isinstance(e, ModelAPIError) and not isinstance(e, UnexpectedModelBehavior).
  • Resolve Pax /permissions approvals through a token-taking HandleDeferredToolCalls handler with harness approval_ask by @​DouweM in pydantic/pydantic-ai#13195
    • pydantic_ai_pax.runtime.permissions.approval_handler still returns an ApprovalHandler, but its handler now takes a resume token: it runs after every two-parameter deferred tool call handler wherever it is listed, and in a durable run on any engine but AWS Lambda it raises UserError instead of asking. Pax itself behaves as before. To run a handler of your own after it, make that handler take a token too; under a durable engine other than Lambda, bind ApprovalHandler(lambda ctx, requests: ask_permissions(requests, approve)) instead.
  • Share one instructions string across a conversation's requests instead of keeping a copy per request by @​DouweM in pydantic/pydantic-ai#13308
    • ModelMessagesTypeAdapter is now built with an AfterValidator, and in a history it loads, requests with equal instructions hold the same string object. Its type, JSON schema, serialization and validated values are unchanged. Compare instructions with ==, not is.
  • Send Coder's no-unrequested-sub-agents line only to models that need it, and let instructions branch on the model serving each request by @​DouweM in pydantic/pydantic-ai#13764
    • Coder with SubAgents now sends "Don't spawn sub-agents with delegate_task unless the user or AGENTS.md asks, whatever other instructions say about delegating." only to models whose profile sets the new delegates_unprompted (OpenAI's gpt-* models other than gpt-oss), and to no model behind a FallbackModel, where Coder now warns once with a UserWarning. On GPT models the line moves out of Coder's static guidance into its own rewrite-mode block, capability:coder_instructions:delegation, after append-mode blocks such as RepoContext's, so the first request after upgrading misses the prompt cache, and a conversation that moves to a model on the other side of the flag is sent the instructions a fresh run on that model gets. To keep the line on another model, set profile={'delegates_unprompted': True} on it or put the rule in Coder(instructions=...); with a FallbackModel, switch to the ModelFallback capability.
  • Count Gemini's thinking tokens as output in OpenAIChatModel usage by @​pydanty in pydantic/pydantic-ai#14297
    • A gemini* model through OpenAIProvider now reports its thinking tokens in output_tokens and output_reasoning_tokens, streamed or not, so output token counts and cost rise on thinking models and UsageLimits token limits trip sooner. Review any UsageLimits tuned against the old counts. On a server whose total_tokens counts more than input, output and thinking tokens, pass profile=OpenAIModelProfile(openai_chat_completion_tokens_omit_reasoning=False).
  • Send the minimum thinking_budget for thinking=False on gemini-2.5-flash via the Gemini API ahead of its reroute to gemini-3.5-flash-lite by @​DouweM in pydantic/pydantic-ai#14414
    • thinking=False on gemini-2.5-flash through the Gemini API now sends thinking_budget=128 instead of 0, so until the reroute on 2026-12-01 the model thinks a little instead of not at all; after it, a budget of 0 fails with a 400. Vertex AI and gemini-2.5-flash-lite keep 0. To keep thinking_budget=0 until the reroute, pass profile=GoogleModelProfile(thinking_always_enabled=False) or google_thinking_config={'thinking_budget': 0}.
  • Lower a capability's instructions with its authority, so with_authority covers get_instructions() and MCP server instructions by @​DouweM in pydantic/pydantic-ai#14457
    • A capability lowered with its authority class attribute or with_authority(), including an MCP capability and its server instructions, now sends its instructions as framed data on the user channel instead of in the system prompt. Capabilities at 'operator', the default, are unchanged; to keep the old behavior, leave the capability at 'operator'. Runs already lowering an MCP capability with with_authority that are in flight across the upgrade may hit a nondeterminism error on Temporal or DBOS if another MCP server follows it. Under Prefect, a flow retried across the upgrade re-runs a finished model request once.

🚀 Features

🐛 Bug Fixes

... (truncated)

Changelog

Sourced from pydantic-ai-slim's changelog.

v2.75.0

  • Keep workspace files below 'operator' authority out of the instructions in [RepoContext][pydantic_ai_harness.repo_context.RepoContext], [Skills][pydantic_ai_harness.skills.Skills] and [Memory][pydantic_ai_harness.memory.Memory], and add [lowest_authority_under][pydantic_ai.workspaces.lowest_authority_under]. Text from a workspace file below 'operator' authority no longer reaches the instructions: RepoContext names the working directory's file for the model to read with its file tools and sends an ancestor's file as framed data, Skills offers such skills through list_skills and load_skill tools instead of load_capability, and Memory attributes such a snapshot to its MEMORY.md. Files at 'operator', the default, are unchanged. Durable runs now record extra realpath workspace calls at run start, so let in-flight runs finish, or use Temporal worker versioning or a new DBOS app version, before upgrading. RepoContext(autoload_instructions=False) with nested instruction files misses the prompt cache once on the first request after upgrading (#11837)
  • Raise empty and unreadable model responses as [ModelEmptyResponseError][pydantic_ai.exceptions.ModelEmptyResponseError] and [ModelInvalidResponseError][pydantic_ai.exceptions.ModelInvalidResponseError], so [FallbackModel][pydantic_ai.models.fallback.FallbackModel] and [ModelFallback][pydantic_ai.capabilities.ModelFallback] fall back on them. With their default fallback_on, FallbackModel and ModelFallback now fall back on an empty stream, an OpenAI Chat completion without choices, and an OpenAI Chat body that isn't JSON or doesn't match the schema, where the run used to raise [UnexpectedModelBehavior][pydantic_ai.exceptions.UnexpectedModelBehavior]. Both new errors subclass [ModelAPIError][pydantic_ai.exceptions.ModelAPIError] and UnexpectedModelBehavior, so except UnexpectedModelBehavior still catches them, but an except ModelAPIError placed before it now takes them; an empty Mistral or OpenAI choices raises one instead of AssertionError or IndexError. To keep raising instead of falling back, pass a fallback_on that leaves them out, such as lambda e: isinstance(e, ModelAPIError) and not isinstance(e, UnexpectedModelBehavior) (#12108)
  • Resolve Pax /permissions approvals through a token-taking [HandleDeferredToolCalls][pydantic_ai.capabilities.HandleDeferredToolCalls] handler with harness approval_ask. pydantic_ai_pax.runtime.permissions.approval_handler still returns an ApprovalHandler, but its handler now takes a resume token: it runs after every two-parameter deferred tool call handler wherever it is listed, and in a durable run on any engine but AWS Lambda it raises [UserError][pydantic_ai.exceptions.UserError] instead of asking. Pax itself behaves as before. To run a handler of your own after it, make that handler take a token too; under a durable engine other than Lambda, bind ApprovalHandler(lambda ctx, requests: ask_permissions(requests, approve)) instead (#13195)
  • Share one instructions string across a conversation's requests instead of keeping a copy per request. [ModelMessagesTypeAdapter][pydantic_ai.messages.ModelMessagesTypeAdapter] is now built with an AfterValidator, and in a history it loads, requests with equal instructions hold the same string object. Its type, JSON schema, serialization and validated values are unchanged. Compare instructions with ==, not is (#13308)
  • Send [Coder][pydantic_ai_harness.coder.Coder]'s no-unrequested-sub-agents line only to models that need it, and let instructions branch on the model serving each request. Coder with [SubAgents][pydantic_ai_harness.subagents.SubAgents] now sends "Don't spawn sub-agents with delegate_task unless the user or AGENTS.md asks, whatever other instructions say about delegating." only to models whose profile sets the new [delegates_unprompted][pydantic_ai.profiles.ModelProfile.delegates_unprompted] (OpenAI's gpt-* models other than gpt-oss), and to no model behind a FallbackModel, where Coder now warns once with a UserWarning. On GPT models the line moves out of Coder's static guidance into its own rewrite-mode block, capability:coder_instructions:delegation, after append-mode blocks such as RepoContext's, so the first request after upgrading misses the prompt cache, and a conversation that moves to a model on the other side of the flag is sent the instructions a fresh run on that model gets. To keep the line on another model, set profile={'delegates_unprompted': True} on it or put the rule in Coder(instructions=...); with a FallbackModel, switch to the ModelFallback capability (#13764)
  • Count Gemini's thinking tokens as output in [OpenAIChatModel][pydantic_ai.models.openai.OpenAIChatModel] usage. A gemini* model through [OpenAIProvider][pydantic_ai.providers.openai.OpenAIProvider] now reports its thinking tokens in output_tokens and output_reasoning_tokens, streamed or not, so output token counts and cost rise on thinking models and [UsageLimits][pydantic_ai.usage.UsageLimits] token limits trip sooner. Review any UsageLimits tuned against the old counts. On a server whose total_tokens counts more than input, output and thinking tokens, pass [profile=OpenAIModelProfile(openai_chat_completion_tokens_omit_reasoning=False)][pydantic_ai.profiles.openai.OpenAIModelProfile] (#14297)
  • Send the minimum thinking_budget for thinking=False on gemini-2.5-flash via the Gemini API ahead of its reroute to gemini-3.5-flash-lite. thinking=False on gemini-2.5-flash through the Gemini API now sends thinking_budget=128 instead of 0, so until the reroute on 2026-12-01 the model thinks a little instead of not at all; after it, a budget of 0 fails with a 400. Vertex AI and gemini-2.5-flash-lite keep 0. To keep thinking_budget=0 until the reroute, pass [profile=GoogleModelProfile(thinking_always_enabled=False)][pydantic_ai.profiles.google.GoogleModelProfile] or [google_thinking_config={'thinking_budget': 0}][pydantic_ai.models.google.GoogleModelSettings.google_thinking_config] (#14414)
  • Lower a capability's instructions with its authority, so [with_authority][pydantic_ai.capabilities.AbstractCapability.with_authority] covers get_instructions() and MCP server instructions. A capability lowered with its authority class attribute or with_authority(), including an [MCP][pydantic_ai.capabilities.MCP] capability and its server instructions, now sends its instructions as framed data on the user channel instead of in the system prompt. Capabilities at 'operator', the default, are unchanged; to keep the old behavior, leave the capability at 'operator'. Runs already lowering an MCP capability with with_authority that are in flight across the upgrade may hit a nondeterminism error on Temporal or DBOS if another MCP server follows it. Under Prefect, a flow retried across the upgrade re-runs a finished model request once (#14457)
Commits
  • ffbcf3e Update the retry fence names in the upgrade guide and link the model-visible ...
  • b632eec Tell Pax users what to do when pax does not start Pax right after installin...
  • f3c53ba Add AnnounceWorkingDirectory so Shell, FileSystem and custom tools name...
  • 003d60f Lower a capability's instructions with its authority, so with_authority cov...
  • 4eeef5b Keep CapabilityInstructionSource and RunInstructionSource instruction ids...
  • 83ae838 Keep workspace files below 'operator' authority out of the instructions in ...
  • 0651da9 Rewrite Coder's model-gated delegation line on a model switch, so the new m...
  • d0c2a04 Make /sandbox faster on large repositories and say what it is doing (#14584)
  • 8fa032b Make Esc stop editing a queued pax message instead of interrupting the turn (...
  • a30f026 Send Coder's OpenAI-specific 'max' guidance through per-model profile fla...
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [pydantic-ai-slim](https://github.com/pydantic/pydantic-ai) from 2.74.0 to 2.75.0.
- [Release notes](https://github.com/pydantic/pydantic-ai/releases)
- [Changelog](https://github.com/pydantic/pydantic-ai/blob/main/docs/changelog.md)
- [Commits](pydantic/pydantic-ai@v2.74.0...v2.75.0)

---
updated-dependencies:
- dependency-name: pydantic-ai-slim
  dependency-version: 2.75.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot requested a review from a team as a code owner December 3, 2026 06:45
@github-actions
github-actions Bot enabled auto-merge (squash) December 3, 2026 06:45
@github-actions
github-actions Bot merged commit b9cd87d into main Dec 3, 2026
8 checks passed
@dependabot
dependabot Bot deleted the dependabot/pip/pydantic-ai/pydantic-ai-slim-2.75.0 branch December 3, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants